# File: Empresa.py
"""\
Empresa Python/Zope/Plone com participacao na comunidade.

"""
# Copyright (c) 2005 by TcheZope.org
# Generator: ArchGenXML Version 1.4 devel 4 http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *

from Perfil import Perfil


from Products.PloneZopista.config import *
##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    StringField('ramo',
        widget=StringWidget(
            description="Informe o ramo de atuacao da empresa.",
            label='Ramo',
            label_msgid='PloneZopista_label_ramo',
            description_msgid='PloneZopista_help_ramo',
            i18n_domain='PloneZopista',
        ),
        required=1,
    ),
    
    LinesField('servicos',
        index="FieldIndex",
        widget=MultiSelectionWidget
        (
            label="Informe os tipos de servicos que a empresa mantem.",
            format="checkbox",
            label_msgid='PloneZopista_label_servicos',
            description='Enter a value for Informe os tipos de servicos que a empresa mantem..',
            description_msgid='PloneZopista_help_servicos',
            i18n_domain='PloneZopista',
        ),
        enforceVocabulary=1,
        multiValued=1,
        vocabulary=VOCAB_SERVICOS,
    ),
    
    TextField('portfolio',
        widget=TextAreaWidget(
            description="Informe os trabalhos desenvolvidos na plataforma Python/Zope/Plone.",
            label="Portifolio",
            label_msgid='PloneZopista_label_portfolio',
            description_msgid='PloneZopista_help_portfolio',
            i18n_domain='PloneZopista',
        ),
        required=1,
        searchable=1,
    ),
    
),
)


##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Empresa(Perfil,BaseContent):
    """
    Empresa Python/Zope/Plone com participacao na comunidade.
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(Perfil,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),)


    # This name appears in the 'add' box
    archetype_name             = 'Empresa'

    meta_type    = 'Empresa' 
    portal_type  = 'Empresa' 
    allowed_content_types      = [] + list(getattr(Perfil, 'allowed_content_types', []))
    filter_content_types       = 0
    global_allow               = 0
    allow_discussion           = 0
    content_icon               = 'empresa_icon.gif'
    immediate_view             = 'base_view'
    default_view               = 'base_view'
    typeDescription            = "Empresa"
    typeDescMsgId              = 'description_edit_empresa'

    schema = BaseSchema + \
             getattr(Perfil,'schema',Schema(())) + \
             schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

registerType(Empresa,PROJECTNAME)
# end of class Empresa

##code-section module-footer #fill in your manual code here
##/code-section module-footer



